package com.yuand.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 全局配置类
 * @author yuand
 */
@Component
@ConfigurationProperties(prefix = "xzjt")
public class Global
{
    /** 项目名称 */
    private static String name;

    /** 版本 */
    private static String version;

    /** 上传路径 */
    private static String profile;



    public void setName(String name)
    {
        Global.name = name;
    }


    public void setVersion(String version)
    {
        Global.version = version;
    }


    public static String getProfile()
    {
        return profile;
    }

    public void setProfile(String profile)
    {
        Global.profile = profile;
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return getProfile() + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile();
    }




}
